/*
 ============================================================================
 Name		: stopwatchAppUi.h
 Author	  : Huang.haiyang
 
     This is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
	 License as published by the Free Software Foundation; either
     version 2 of the License, or (at your option) any later version.
 
     This software is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     Lesser General Public License for more details.
     
 Description : Declares UI class for application.
 ============================================================================
 */

#ifndef STOPWATCHAPPUI_H
#define STOPWATCHAPPUI_H

// INCLUDES
#include <aknappui.h>

// FORWARD DECLARATIONS
class CStopwatchView;

// CLASS DECLARATION

/**
 * Application UI class.
 * Provides support for the following features:
 * - EIKON control architecture
 * 
 */
class CStopwatchAppUi : public CAknAppUi
	{
public:
	// // Constructors and destructor

	/**
	 * EPOC default constructor.
	 */
	void ConstructL();

	/**
	 * Destructor.
	 */
	~CStopwatchAppUi();

public:
	// New functions

public:
	// Functions from base classes

private:
	// From MEikMenuObserver
	void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);

private:
	/**
	 * From CEikAppUi, takes care of command handling.
	 * @param aCommand command to be handled
	 */
	void HandleCommandL(TInt aCommand);

	/**
	 * From CEikAppUi, handles key events.
	 * @param aKeyEvent Event to handled.
	 * @param aType Type of the key event. 
	 * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
	 */
	virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,
			TEventCode aType);

	// From CCoeAppUi
	CArrayFix<TCoeHelpContext>* HelpContextL() const;

private:
	CStopwatchView* CreateStopwatchView(const TRect& aRect);
	
private:
	//Data
	CStopwatchView* iAppContainer;
	};

#endif // STOPWATCHAPPUI_H

